/*项目信息管理-详情-项目专户信息*/
import 'package:flutter/cupertino.dart';
import 'package:frametrim/utility/Tools.dart';
import 'package:frametrim/utility/sq_color.dart';

import '../../appviews/textUpTextView.dart';
import '../../appviews/textUpTextViewJump.dart';
import '../../model/ProjectMessManagerBasicM.dart';


class PeojectMessDetailsPage02 extends StatefulWidget {
  //项目类别
  late ProjectMessManagerBasicRecords? data;

  @override
  State<StatefulWidget> createState() => PeojectMessDetailsPage02State();

  PeojectMessDetailsPage02(this.data);
}

class PeojectMessDetailsPage02State extends State<PeojectMessDetailsPage02> {
  late ScrollPhysics physics = NeverScrollableScrollPhysics();

  @override
  Widget build(BuildContext context) {
    return Container(
      child: ListView(
        //禁止滚动
        physics: physics,
        padding: EdgeInsets.only(top: 10),
        children: buildWidget(),
      ),
    );
  }

  List<Widget> buildWidget() {
    List<Widget> children = [];
    if (widget.data!.projectAccount != null) {
      var projectAccount = widget.data!.projectAccount!;
      var projectInfo = widget.data!.projectInfo!;
      children.add(TextUpTextView('是否开设工资专用账户',
          Tools.getYesOrNoName(projectInfo.isBankAccountOpened!)));
      children.add(TextUpTextView('专户名称', projectAccount.accountName!));
      children.add(TextUpTextView('专用账号', projectAccount.accountBankNo!));
      children.add(TextUpTextView('开户银行', '--'));
      children.add(TextUpTextView('开户时间', projectAccount.openAccountTime!));
      children.add(TextUpTextViewJump(
          '是否签订三方监督协议',
          Tools.getYesOrNoName(projectAccount.isTripartiteSupervise!),
          "查看三方监管协议",
          projectAccount.tripartiteSuperviseUrl!));
    } else {
      children.add(Container(
          width: double.infinity,
          height: 200,
          child: Center(
            child: Text("暂无专户信息",
                style: TextStyle(fontSize: 15, color: SQColor.color_60black)),
          )));
    }

    return children;
  }
}
